import request from "@/utils/request.js";

const url = '/cloud-message-service/sms-send-log'

/**
 * 分页查询短信发送记录
 */
export function page(data) {
    return request({
        url: url + "/page",
        method: "post",
        data
    });
}

/**
 * 新增或修改短信记录
 */
export function save(data) {
    return request({
        url: url + "/save",
        method: "post",
        data
    });
}

/**
 * 根据id删除短信记录
 */
export function removeById(id) {
    return request({
        url: url + `/removeById/${id}`,
        method: "get",
    });
}

/**
 * 根据id查看短信记录
 */
export function getById(id) {
    return request({
        url: url + `/getById/${id}`,
        method: "get",
    });
}

// 列表相关列信息
export const columnInfo = [
    {
        "title":"序号",
        "type":"seq",
        "fixed":"left",
        "align":"center",
        "width":"60"
    },
    {
        "type":"checkbox",
        "fixed":"left",
        "align":"center",
        "width":"60"
    },
    {
        "title":"短信签名",
        "field":"signName",
        "align":"center",
        "minWidth":"150"
    },
    {
        "title":"短信渠道",
        "field":"channelNameCodeTxt",
        "align":"center",
        "minWidth":"80"
    },
    {
        "title":"短信接收人员",
        "field":"receivePersonName",
        "align":"center",
        "minWidth":"80"
    },
    {
        "title":"接收人手机号",
        "field":"receivePersonPhone",
        "align":"center",
        "minWidth":"100"
    },
    {
        "title":"模板名称",
        "field":"templateName",
        "align":"center",
        "minWidth":"150"
    },
    {
        "title":"短信模板",
        "field":"templateContent",
        "showOverflow":"title",
        "align":"center",
        "minWidth":"200"
    },
    {
        "title":"短信参数",
        "field":"params",
        "align":"center",
        "showOverflow":"title",
        "minWidth":"200"
    },
    {
        "title":"短信内容",
        "field":"content",
        "align":"center",
        "showOverflow":"title",
        "minWidth":"300"
    },
    {
        "title":"发送状态",
        "field":"sendStatus",
        "align":"center",
        "minWidth":"60"
    },
    {
        "title":"发送日志",
        "field":"sendLog",
        "showOverflow":"title",
        "align":"center",
        "minWidth":"150"
    },
    {
        "title":"发送时间",
        "field":"sendTime",
        "align":"center",
        "minWidth":"130"
    },
    {
        "title":"操作",
        "field":"operate",
        "fixed":"right",
        "align":"center",
        "proxyColumn":true,
        "minWidth":"100px",
        /*"options":[
            {
                "text":true,
                "btnName":"重置密码",
                "type":"primary",
                "icon":"RefreshLeft",
                "method":"showFormDialog"
            },
        ]*/
    }
]
